<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ArNetworking: ArClientDataReceiver&lt; C, T &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ArNetworking
   &#160;<span id="projectnumber">dev20180125</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArClientDataReceiver.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classArClientDataReceiver-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArClientDataReceiver&lt; C, T &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A client program may use this to receive responses to data requests and pass the received data to a provided function or method, or save (cache) the most recently received data.  
 <a href="classArClientDataReceiver.html#details">More...</a></p>

<p><code>#include &lt;ArClientDataReceiver.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:afd7b2e5c1676857000c0771009b0c07a"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArClientDataReceiver.html#afd7b2e5c1676857000c0771009b0c07a">RequestType</a> { <a class="el" href="classArClientDataReceiver.html#afd7b2e5c1676857000c0771009b0c07aa28543b3567951f8a163fafffb5a5c140">Once</a>, 
<a class="el" href="classArClientDataReceiver.html#afd7b2e5c1676857000c0771009b0c07aaf1dfd31ceb253a42a4e61b6b7057f802">OnceUDP</a>, 
<a class="el" href="classArClientDataReceiver.html#afd7b2e5c1676857000c0771009b0c07aab36715eb48f8403992d2a626ef13f8e5">Repeat</a>, 
<a class="el" href="classArClientDataReceiver.html#afd7b2e5c1676857000c0771009b0c07aa4cd3857378d64516063b6bbf14020fa4">None</a>
 }</td></tr>
<tr class="separator:afd7b2e5c1676857000c0771009b0c07a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a34540406b6c5ab5d9e5ea300d747df3a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArClientDataReceiver.html#a34540406b6c5ab5d9e5ea300d747df3a">ArClientDataReceiver</a> (<a class="el" href="classArClientBase.html">ArClientBase</a> *<a class="el" href="configClientToServer_8cpp.html#afe594bfb305907ae82f259409cc214cb">client</a>, const char *requestName, <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArFunctor1.html">ArFunctor1</a>&lt; const T &amp; &gt; *functor, long interval)</td></tr>
<tr class="memdesc:a34540406b6c5ab5d9e5ea300d747df3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register a function to handle data of a specific type received from the server.  <a href="#a34540406b6c5ab5d9e5ea300d747df3a">More...</a><br /></td></tr>
<tr class="separator:a34540406b6c5ab5d9e5ea300d747df3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c13d52e3d41f1c7155730658c3d0172"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArClientDataReceiver.html#a0c13d52e3d41f1c7155730658c3d0172">ArClientDataReceiver</a> (<a class="el" href="classArClientBase.html">ArClientBase</a> *<a class="el" href="configClientToServer_8cpp.html#afe594bfb305907ae82f259409cc214cb">client</a>, const char *requestName, C *obj, void(C::*function)(const T &amp;), long interval=-1)</td></tr>
<tr class="separator:a0c13d52e3d41f1c7155730658c3d0172"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8de45029d7e1529118a2aa3c0cb8bb4"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArClientDataReceiver.html#aa8de45029d7e1529118a2aa3c0cb8bb4">~ArClientDataReceiver</a> ()</td></tr>
<tr class="memdesc:aa8de45029d7e1529118a2aa3c0cb8bb4"><td class="mdescLeft">&#160;</td><td class="mdescRight">The destructor calls client-&gt;remHandler() to remove the handler, and client-&gt;requestStop() to stop receiving the data.  <a href="#aa8de45029d7e1529118a2aa3c0cb8bb4">More...</a><br /></td></tr>
<tr class="separator:aa8de45029d7e1529118a2aa3c0cb8bb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;class C, typename T&gt;<br />
class ArClientDataReceiver&lt; C, T &gt;</h3>

<p>A client program may use this to receive responses to data requests and pass the received data to a provided function or method, or save (cache) the most recently received data. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classArServerDataProvider.html" title="Tool to easily obtain and provide changing data values from an acessor method of a class...">ArServerDataProvider</a></dd></dl>
<dl class="section note"><dt>Note</dt><dd>If the server does not have the requested data item at time of request, it will not be requested. A warning will be logged.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>2.9.3  </dd></dl>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="afd7b2e5c1676857000c0771009b0c07a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C, typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classArClientDataReceiver.html#afd7b2e5c1676857000c0771009b0c07a">ArClientDataReceiver::RequestType</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="afd7b2e5c1676857000c0771009b0c07aa28543b3567951f8a163fafffb5a5c140"></a>Once&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="afd7b2e5c1676857000c0771009b0c07aaf1dfd31ceb253a42a4e61b6b7057f802"></a>OnceUDP&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="afd7b2e5c1676857000c0771009b0c07aab36715eb48f8403992d2a626ef13f8e5"></a>Repeat&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="afd7b2e5c1676857000c0771009b0c07aa4cd3857378d64516063b6bbf14020fa4"></a>None&#160;</td><td class="fielddoc">
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a34540406b6c5ab5d9e5ea300d747df3a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C, typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArClientDataReceiver.html">ArClientDataReceiver</a>&lt; C, T &gt;::<a class="el" href="classArClientDataReceiver.html">ArClientDataReceiver</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArClientBase.html">ArClientBase</a> *&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>requestName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArFunctor1.html">ArFunctor1</a>&lt; const T &amp; &gt; *&#160;</td>
          <td class="paramname"><em>functor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>interval</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Register a function to handle data of a specific type received from the server. </p>
<p>This class will call client-&gt;request(), client-&gt;requestOnce() or client-&gt;requestOnceUdp() to request the data after registering the handler. </p><dl class="section note"><dt>Note</dt><dd>the data sent by the server must be of the given type, or </dd></dl>

<p>References <a class="el" href="classArClientBase.html#af75610dd7e91d98097de1b252d0bacd5">ArClientBase::addHandler()</a>, <a class="el" href="changeMapOnServer_8cpp.html#afe594bfb305907ae82f259409cc214cb">client</a>, <a class="el" href="classArClientBase.html#a873a731b968b4e3359c60d592122770b">ArClientBase::dataExists()</a>, <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log()</a>, <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, and <a class="el" href="classArClientBase.html#a0a36a40fe2598eb214368ae8c3a26ca1">ArClientBase::request()</a>.</p>

</div>
</div>
<a class="anchor" id="a0c13d52e3d41f1c7155730658c3d0172"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C, typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArClientDataReceiver.html">ArClientDataReceiver</a>&lt; C, T &gt;::<a class="el" href="classArClientDataReceiver.html">ArClientDataReceiver</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArClientBase.html">ArClientBase</a> *&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>requestName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">C *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(C::*)(const T &amp;)&#160;</td>
          <td class="paramname"><em>function</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>interval</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="aa8de45029d7e1529118a2aa3c0cb8bb4"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C, typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classArClientDataReceiver.html">ArClientDataReceiver</a>&lt; C, T &gt;::~<a class="el" href="classArClientDataReceiver.html">ArClientDataReceiver</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The destructor calls client-&gt;remHandler() to remove the handler, and client-&gt;requestStop() to stop receiving the data. </p>

<p>References <a class="el" href="classArClientBase.html#a904bea3bf052b9a13bba5d81e45f68f9">ArClientBase::remHandler()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="ArClientDataReceiver_8h.html">ArClientDataReceiver.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArClientDataReceiver.html">ArClientDataReceiver</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
